import 'dart:io';

import 'package:flutter/widgets.dart';

class LocalImage extends StatefulWidget {
  LocalImage({Key key, this.path, this.width, this.height, this.fit, this.alignment}) : super(key: key);

  final String path;
  final double width;
  final double height;
  final BoxFit fit;
  final Alignment alignment;

  @override
  _LocalImageState createState() => _LocalImageState();
}

class _LocalImageState extends State<LocalImage> {
  @override
  Widget build(BuildContext context) {
    return Image.file(
        File(widget.path), 
        width: widget.width, 
        height: widget.width,
        fit: BoxFit.cover,
        alignment: Alignment.center,
    );
  }
}